import request from '@/utils/request'

// 查询学习资料列表
export function listMaterials(query) {
  return request({
    url: '/manager/materials/list',
    method: 'get',
    params: query
  })
}

// 查询学习资料列表
export function listallMaterials(query) {
  return request({
    url: '/manager/materials/listall',
    method: 'get',
    params: query
  })
}

// 查询学习资料详细
export function getMaterials(id) {
  return request({
    url: '/manager/materials/' + id,
    method: 'get'
  })
}


// 新增学习资料
export function addMaterials(data) {
  return request({
    url: '/manager/materials',
    method: 'post',
    data: data
  })
}

// 修改学习资料
export function updateMaterials(data) {
  return request({
    url: '/manager/materials',
    method: 'put',
    data: data
  })
}


// 删除学习资料
export function delMaterials(id) {
  return request({
    url: '/manager/materials/' + id,
    method: 'delete'
  })
}

